package com.gitee.wsl.coroutines.strategy.pausing

import kotlinx.coroutines.Deferred
import kotlinx.coroutines.InternalForInheritanceCoroutinesApi

/**
 * Represent a [Deferred] that also can be paused and resumed
 */
@OptIn(InternalForInheritanceCoroutinesApi::class)
class PausingDeferred<T>(
    private val deferred: Deferred<T>,
    private val pausingHandle: PausingHandle,
) : Deferred<T> by deferred, PausingHandle by pausingHandle